﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Physis.Core {

    public class CoreConfigurationObject : CoreObject {

        #region Private Properties 

        private Boolean enabled = true;

        #endregion 


        #region Public Properties 

        public Boolean Enabled { get { return enabled; } set { enabled = value; } }

        #endregion 


        #region Constructors

        protected CoreConfigurationObject () { return; }

        public CoreConfigurationObject (Application forApplication) : base (forApplication) { return; }

        public CoreConfigurationObject (Application forApplication, Int64 forId) : base (forApplication, forId) { return; }

        public CoreConfigurationObject (Application forApplication, String forName) : base (forApplication, forName) { return; }

        #endregion 


        #region Database Functions

        public override void MapDataFields (System.Data.DataRow currentRow) {

            base.MapDataFields (currentRow);


            Enabled = Data.Readers.DataReader.BooleanFromDatabase (currentRow, "Enabled");


            return;

        }

        #endregion 

    }

}
